* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
}

.container {
  display: flex;
  justify-content: center;
  align-items: center;
}

.traffic-light {
  position: relative;
  width: 100px;
  height: 300px;
  background: #e2e2e2;
  border-radius: 20px;
  box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.3), 0 0 20px rgba(0, 0, 0, 0.3);
}

ul {
  list-style: none;
  width: 80px;
  height: 230px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  right: 0;
  margin: auto;
}

li {
  border-radius: 50%;
  width: 80px;
  height: 80px;
  background-color: #b3b3b3;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1), 0 -10px 10px rgba(255, 255, 255, 0.3) inset, 0 10px 10px rgba(0, 0, 0, 0.2) inset;
  transition: background-color 0.2s ease-in-out;
}

.red {
  background-color: #ff4154;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1), 0 -10px 10px rgba(255, 255, 255, 0.3) inset, 0 10px 10px rgba(0, 0, 0, 0.2) inset;
}

.red.active {
  background-color: #ff0000;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1), 0 -10px 10px rgba(255, 255, 255, 0.3) inset, 0 20px 40px rgba(255, 0, 0, 0.9) inset, 0 0 10px rgba(0, 0, 0, 0.4);
}

.yellow {
  background-color: #f7d038;
}

.yellow.active {
  background-color: #ffff00;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1), 0 -10px 10px rgba(255, 255, 255, 0.3) inset, 0 20px 40px rgba(255, 255, 0, 0.5) inset, 0 0 10px rgba(0, 0, 0, 0.4);
}

.green {
  background-color: #86bf35;
}

.green.active {
  background-color: #00ff00;
  box-shadow: 0 0 15px rgba(0, 0, 0, 0.1), 0 -10px 10px rgba(255, 255, 255, 0.3) inset, 0 20px 40px rgba(0, 255, 0, 0.5) inset, 0 0 10px rgba(0, 0, 0, 0.4);
}